From: Marco Trevisan (TreviƱo) Date: Thu, 16 Apr 2026 16:35:57 +0000 (+0200) Subject: mpris: Only expose the players that can play X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~10^2^2~40 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f4965964d34314d8c4d490c8f95a3f50710660be;p=gnome-shell.git mpris: Only expose the players that can play In mpris we only emit "player-added" for players that can actually play, but during NotificationBox and MessageList initialization we add them all, including those not having being technically added. And this may be a problem when locking the screen, since we do not want players to show if they cannot play. So, be consistent and expose publicly only the players that can play Part-of: --- diff --git a/js/ui/mpris.js b/js/ui/mpris.js index 1ab2d4037..44efbd64e 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -204,7 +204,7 @@ export const MprisSource = GObject.registerClass({ } get players() { - return [...this._players.values()]; + return [...this._players.values()].filter(player => player.canPlay); } _addPlayer(busName) {